package com.io.asser;

import com.io.exception.ScException;
import org.springframework.util.StringUtils;

/**
 * The class/interface
 *
 * @author guodd
 * @version 1.0 use jdk 1.8
 */
public class AssertUtils {
    public static void isNull(Object o, String message) {
        if (StringUtils.isEmpty(o)) {
            throw new ScException(454, message);
        }
    }

    public static void eq(Object o1, Object o2, String message) {
        if (!o1.equals(o2)) {
            throw new ScException(454, message);
        }
    }
}
